﻿using HomagGroup.Base.UI;
using Proxy;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomagChina.CCHS.ViewModels
{
    public class TaskInfoViewModel : NotifyPropertyChangedBase
    {
        private InsertInfoHandle Handle_Insert;
        private SearchInfoHandle Handle_Search;
        private CommonHandle Handle_Common;

        private ObservableCollection<TaskInfoModel> _List_TaskInfoModel;

        public ObservableCollection<TaskInfoModel> List_TaskInfoModel
        {
            get => _List_TaskInfoModel;
            set { _List_TaskInfoModel = value; OnPropertyChanged(); }
        }

        public TaskInfoViewModel(JobModel model)
        {
            Handle_Insert = new InsertInfoHandle();
            Handle_Search = new SearchInfoHandle();
            Handle_Common = new CommonHandle();
            Quary(model.JobId, model.StackId);
        }

        public void Quary(string JobId, string StackId)
        {
            List_TaskInfoModel = Handle_Search.GetTaskInfoModels(JobId, StackId);
        }
    }
}